home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: Calendar time
- Date: Fri, 23 Feb 96 00:44:08 GMT
- Organization: none
- Message-ID: <825036248snz@genesis.demon.co.uk>
- References: <312670A6.71F3@liant.com>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <312670A6.71F3@liant.com> barron@liant.com "Robert Barron" writes:
-
- >I'm trying to print out the date and time from a supplied time_t
- >variable. However I do not want to do any timezone conversion on that
- >value.
-
- What you don't know is what timezone adjustments are already encoded into
- the value. If the value was generated by mktime() then localtime() should
- reproduce the values (so long as they were valud dates/times). Otherwise
- gmtime() is the alternative.
-
- > Whenever I try to get a structure I can manipulate (gmtime,
- >localtime, ctime, etc.) it always seems to convert the time and the
- >hours is off.
-
- You need to provide more information e.g. how the time_t value was generated
- and how the values you ended up with were 'off'.
-
- > Is there a simple routine available that will break down
- >a time_t variable into it's constituent parts without any conversion?
-
- No, the representation of time_t is not specific by the C language and can
- vary from system to system.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-